﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DevComponents.DotNetBar;
using QLBH.Modules;
namespace QLBH
{
    public enum eType { ADD, EDIT};
    public partial class MainForm : Office2007RibbonForm
    {
        private static MainForm instance;

        public static MainForm Instance
        {
          get { return MainForm.instance; }          
        }

        private int shop_id;

        public int Shop_id
        {
            get { return shop_id; }
            set { shop_id = value; }
        }
        public MainForm()
        {
            InitializeComponent();
            instance=this;
            shop_id = 1;
        }
        public void DisplayView(Control view)
        {
            view.Dock = DockStyle.Fill;

            this.rootpanel.Controls.Clear();
            this.rootpanel.Controls.Add(view);
        }

        private void btnStaff_Click(object sender, EventArgs e)
        {
            //ucStaffs staffdlg = new ucStaffs();
            //DisplayView(staffdlg);
        }

        private void btnBranchInfo_Click(object sender, EventArgs e)
        {
            ucBranchs branchsdlg = new ucBranchs();
            DisplayView(branchsdlg);
        }

        private void btnWarehouse_Click(object sender, EventArgs e)
        {
            ucWarehouse warehousedlg = new ucWarehouse();
            DisplayView(warehousedlg);
        }

        private void btnCategory_Click(object sender, EventArgs e)
        {
            ucCategory categorydlg = new ucCategory();
            DisplayView(categorydlg);
        }

        private void btnGood_Click(object sender, EventArgs e)
        {
            ucGood gooddlg = new ucGood();
            DisplayView(gooddlg);
        }

        private void btnProvider_Click(object sender, EventArgs e)
        {
            ucProvider providerdlg = new ucProvider();
            DisplayView(providerdlg);
        }

        private void btnUnit_Click(object sender, EventArgs e)
        {
            ucUnits unitdlg = new ucUnits();
            DisplayView(unitdlg);
        }

        private void btnCustomer_Click(object sender, EventArgs e)
        {
            ucCustomer Customer = new ucCustomer();
            DisplayView(Customer);
        }

        private void btnIndustry_Click(object sender, EventArgs e)
        {
            ucIndustry industrydlg = new ucIndustry();
            DisplayView(industrydlg);
        }

        private void btnSaleBill_Click(object sender, EventArgs e)
        {
            ucBillSale billsale = new ucBillSale();
            DisplayView(billsale);
        }
        private void btnOrder_Click(object sender, EventArgs e)
        {
            ucOrders ordersdlg = new ucOrders();
            DisplayView(ordersdlg);
        }

    }
}
